import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;

/**
 * @author : fengleifeng
 * @Package PACKAGE_NAME
 * @Description:
 * @date Date : 2021年04月12日 7:11 下午
 */
public class zzz {

    public static void main(String[] args) {
//        int max = 12051457;
//        int min = 11456;
//        int tempBig = max;
//        int tempMin = min;
//        while (tempBig>tempMin){
//            int now = tempBig - 40000
//                ;
//            StringBuffer sb = new StringBuffer("");
//            sb.append("   delete from nd_application_info where bank_id ='bqd' and card_meta_id = 5 and id <= ");
//            sb.append(tempBig);
//            sb.append(" and  id>=" + now + ";");
//            tempBig = now;
//            System.out.println(sb);
//        }
        String filePath = "/Users/fengleifeng/cccccc";
        Set<String> set = new HashSet<>();
        try
        {
            String encoding = "GBK";
            File file = new File(filePath);
            if (file.isFile() && file.exists())
            { // 判断文件是否存在
                InputStreamReader read = new InputStreamReader(
                    new FileInputStream(file), encoding);// 考虑到编码格式
                BufferedReader bufferedReader = new BufferedReader(read);
                String lineTxt = null;

                while ((lineTxt = bufferedReader.readLine()) != null)
                {
//                    System.out.println(lineTxt);
                    String[] arr = lineTxt.split(",");
                    for (int i = 0; i < arr.length; i++) {
                        String[] two = arr[i].split("=");
                        set.add(two[0]);
                    }
                }
                bufferedReader.close();
                read.close();
            }
            else
            {
                System.out.println("找不到指定的文件");
            }
        }
        catch (Exception e)
        {
            System.out.println("读取文件内容出错");
            e.printStackTrace();
        }

        for (String str:set){
            System.out.println(str);
        }
    }
}
